<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="common_css :: commonHeader('需求BUG管理')"></head>
<body>
<!--搜索框-->
<form method="post" id="tabfrom">
    <div style="padding:2px" class="easyui-panel" title="数据查询">
        <table class="form-table">
            <tr>
                <td align="right" width="10%">需求/BUG编号：</td>
                <td>
                    <input id="selDemandBugNum" style="width:150px"/>
                </td>
                <td align="right" width="10%">需求/BUG：</td>
                <td>
                    <input id="selDemandBugType" editable="false"
                           class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: '',  value: '==全部==' },{ label: '1',  value: '需求' },{ label: '2', value: 'BUG'}]"/>
                </td>
                <td align="right">版本号：</td>
                <td>
                    <input style="width:150px" id="selVersion"
                           data-options="valueField:'value',textField:'showmsg' ,panelHeight:'auto',prompt:'==请选择=='"
                           class="easyui-combobox"/>
                </td>
            </tr>
            <tr>
                <td align="right" width="10%">开始时间：</td>
                <td>
                    <input style="width:150px" class="easyui-datebox" id="startDate" editable="false"
                           data-options="required:false,showSeconds:false,panelHeight:'auto'">

                </td>
                <td align="right" width="10%">结束时间：</td>
                <td>
                    <input style="width:150px" class="easyui-datebox" id="endDate" editable="false"
                           data-options="required:false,showSeconds:false,panelHeight:'auto'">
                </td>
                <td align="right" width="10%">状态：</td>
                <td align="left">
                    <input style="width:150px" id="selStatus"
                           data-options="valueField:'value',textField:'showmsg' ,panelHeight:'auto',prompt:'==请选择=='"
                           class="easyui-combobox"/>
                    <a class="easyui-linkbutton" iconCls='icon-search' onclick="doSearch();">查询</a>
                </td>
            </tr>
        </table>
    </div>
    <br>
</form>
<div id="toolbar">
    <shiro:hasPermission name="reportworld:demandbuginfo:add">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add"
           onclick="addDemandBugInfo()">添加</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="reportworld:demandbuginfo:edit">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit"
           onclick="editDemandBugInfo()">修改</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="reportworld:demandbuginfo:del">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel"
           onclick="delDemandBugInfo()">删除</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="reportworld:demandbuginfo:readFile">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-application-form-add"
           onclick="uploadFile.click()">读取文件</a>
    </shiro:hasPermission>
</div>

<div id="dg"></div>


<div id="dlg" class="easyui-dialog" style="width:650px;height:610px"
     closed="true" modal="true" maximizable="true" resizable="true">
    <form id="myform" method="post">
        <div style="padding:20px">
            <table cellpadding="2px" cellspacing="0" class="form-table">
                <input type="hidden" id="id" name="id">
                <tr>
                    <td align="right" width="20%">需求/BUG：</td>
                    <td>
                        <input id="demandBugType" name="demandBugType" ediDataSql="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: '1',  value: '需求' },{ label: '2', value: 'BUG'}]"
                               validType="comboxValidate['demandBugType','请选择需求还是BUG']"/>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="20%">需求/BUG编号：</td>
                    <td>
                        <input class="easyui-validatebox" name="demandBugNum" id="demandBugNum" style="width:150px"
                               data-options="required:true"
                               validType="checkDemandBug['demandBugNumFirst','需求/BUG编号已经存在，请更换！']"
                               missingMessage="请输入需求或者BUG编号！"/>
                        <input type="hidden" class="textbox" name="demandBugNumFirst" id="demandBugNumFirst"/><!--之前的-->
                    </td>
                </tr>
                <tr>
                    <td align="right" width="20%">需求/BUG来源：</td>
                    <td>
                        <input id="demandBugFsource" name="demandBugFsource" ediDataSql="false"
                               class="easyui-combobox" data-options="prompt:'==请选择==',panelHeight:'auto', valueField: 'label', textField: 'value',
                                    data: [{ label: '1',  value: '外部' },{ label: '2', value: '内部'}]"
                               validType="comboxValidate['demandBugFsource','请选择需求还是BUG']"/>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="20%">版本号：</td>
                    <td>
                        <input name="version" id="demandBugInfoVersion"
                               data-options="valueField:'value',textField:'showmsg' ,panelHeight:'auto',prompt:'==请选择=='"
                               class="easyui-combobox"/>
                    </td>
                </tr>
                <tr>
                    <td align="right" width="20%">日期：</td>
                    <td>
                        <input style="width:150px" class="easyui-datebox" id="demandBugDate" name="demandBugDate"
                               editable="false"
                               value="true"
                               data-options="required:false,showSeconds:false,panelHeight:'auto'">

                    </td>
                </tr>
                <td align="right" width="20%">状态：</td>
                <td align="left">
                    <input id="demandBugInfoStatus" name="status"
                           data-options="valueField:'value',textField:'showmsg' ,panelHeight:'auto',prompt:'==请选择=='"
                           class="easyui-combobox"/>
                </td>
                <tr>
                    <td align="right" width="20%">说明：</td>
                    <td colspan="3">
                        <input class="easyui-textbox" name="description"
                               missingMessage="请输入需求说明！"
                               data-options="multiline:true,required:true" style="height:270px;width:350px"/>
                    </td>
                </tr>
            </table>
        </div>

    </form>
</div>

<div id="msgInfoDialog" class="easyui-dialog" style="width:500px;height:310px"
     closed="true" modal="true" maximizable="true" resizable="true">
    <input class="easyui-textbox" name="msgInfo" id="msgInfo"
           data-options="multiline:true" style="height:100%;width:100%"/>
</div>

<div style="display: none;">
    <form id="subFile" enctype="multipart/form-data" method="post">
        <input accept=".xlsx,.XLSX" name="multipartfile" type="file"
               id="uploadFile" onchange="setFilePreview(this.value);">
    </form>
</div>
<div th:include="common_js :: commJS"></div>
<script type="text/javascript"
        th:src="@{/js/reportworld/demandBugInfo.js}"></script>
</body>
</html>
